<!doctype html>
<html class="no-js">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>Amaze UI Admin index Examples</title>
		<meta name="description" content="这是一个 index 页面">
		<meta name="keywords" content="index">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="renderer" content="webkit">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<link rel="icon" type="image/png" href="assets/i/favicon.png">
		<link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
		<meta name="apple-mobile-web-app-title" content="Amaze UI" />
		<link rel="stylesheet" href="assets/css/amazeui.min.css" />
		<link rel="stylesheet" href="assets/css/admin_custom.css" />
		<link rel="stylesheet" href="assets/css/wxtw.css" />
		<link rel="stylesheet" href="assets/css/editor.css" />
	</head>
<style>
	.app-design .app-preview{
		width: 325px;
		margin: 7px;
	}
</style>
	<body>
		<div style="  color: #000;  background-color:#fff ; border-radius: 5px 5px 5px 5px; ">

			<div class="modalcon">

				<div class="modal-header"><a class="close" data-dismiss="modal">×</a>
					<h3 class="title">选择图文</h3></div>
				<div class="modal-body">
					<div class="am-g picmodal">
						
						<span class="app-design clearfix">

							<div class="app-preview">

								<div class="app-entry">

									<div class="app-fields appmsg-multiple js-fields-region">
										<div class="app-fields ui-sortable">
											<div class="app-field clearfix not-sortable js-not-sortable">
												<div class="appmsg appmsg-multiple-first">
													<h4 class="appmsg-title">1</h4>
													<p class="appmsg-meta">2015-12-23</p>
													<div class="appmsg-thumb-wrap">

														<p>封面图片</p>

													</div>

													<div class="appmsg-view-full clearfix">
														<span>阅读全文</span>
														<span class="pull-right">&gt;</span>
													</div>
												</div>

												<div class="actions">
													<div class="actions-wrap">
														<span class="action edit">编辑</span>

													</div>
												</div>
											</div>
											<div class="app-field clearfix not-sortable js-not-sortable">
												<div class="appmsg appmsg-multiple-others">
													<h4 class="appmsg-title">2</h4>
													<div class="appmsg-thumb-wrap">

														<p>缩略图</p>

													</div>
												</div>

												<div class="actions">
													<div class="actions-wrap">
														<span class="action edit">编辑</span>

													</div>
												</div>
											</div>

											<div class="app-field sortitem clearfix">
												<div class="appmsg appmsg-multiple-others">
													<h4 class="appmsg-title">标题</h4>
													<div class="appmsg-thumb-wrap">
														<p>缩略图</p>
													</div>
												</div>
												<div class="actions">
													<div class="actions-wrap"><span class="action edit">编辑</span> <span class="action delete">删除</span></div>
												</div>
											</div>
											<div class="app-field sortitem clearfix">
												<div class="appmsg appmsg-multiple-others">
													<h4 class="appmsg-title">标题</h4>
													<div class="appmsg-thumb-wrap">
														<p>缩略图</p>
													</div>
												</div>
												<div class="actions">
													<div class="actions-wrap"><span class="action edit">编辑</span> <span class="action delete">删除</span></div>
												</div>
											</div>
										</div>

									</div>

								</div>

								<div class="twshade"  style="position: absolute;  background-color: rgba(0,0,0,0.6); width: 325px; height: 388px;top: 0;display: none;"></div>							
							</div>

							
						</span>
						
						<span class="app-design clearfix">

							<div class="app-preview">

								<div class="app-entry">

									<div class="app-fields appmsg-multiple js-fields-region">
										<div class="app-fields ui-sortable">
											<div class="app-field clearfix not-sortable js-not-sortable">
												<div class="appmsg appmsg-multiple-first">
													<h4 class="appmsg-title">1</h4>
													<p class="appmsg-meta">2015-12-23</p>
													<div class="appmsg-thumb-wrap">

														<p>封面图片</p>

													</div>

													<div class="appmsg-view-full clearfix">
														<span>阅读全文</span>
														<span class="pull-right">&gt;</span>
													</div>
												</div>

												<div class="actions">
													<div class="actions-wrap">
														<span class="action edit">编辑</span>

													</div>
												</div>
											</div>
											<div class="app-field clearfix not-sortable js-not-sortable">
												<div class="appmsg appmsg-multiple-others">
													<h4 class="appmsg-title">2</h4>
													<div class="appmsg-thumb-wrap">

														<p>缩略图</p>

													</div>
												</div>

												<div class="actions">
													<div class="actions-wrap">
														<span class="action edit">编辑</span>

													</div>
												</div>
											</div>

											<div class="app-field sortitem clearfix">
												<div class="appmsg appmsg-multiple-others">
													<h4 class="appmsg-title">标题</h4>
													<div class="appmsg-thumb-wrap">
														<p>缩略图</p>
													</div>
												</div>
												<div class="actions">
													<div class="actions-wrap"><span class="action edit">编辑</span> <span class="action delete">删除</span></div>
												</div>
											</div>
											<div class="app-field sortitem clearfix">
												<div class="appmsg appmsg-multiple-others">
													<h4 class="appmsg-title">标题</h4>
													<div class="appmsg-thumb-wrap">
														<p>缩略图</p>
													</div>
												</div>
												<div class="actions">
													<div class="actions-wrap"><span class="action edit">编辑</span> <span class="action delete">删除</span></div>
												</div>
											</div>
										</div>

									</div>

								</div>

								<div class="twshade"  style="position: absolute;  background-color: rgba(0,0,0,0.6); width: 325px; height: 388px;top: 0;display: none;"></div>	
							</div>

						</span>												
						<span class="app-design clearfix">

							<div class="app-preview">

								<div class="app-entry">

									<div class="app-fields appmsg-multiple js-fields-region">
										<div class="app-fields ui-sortable">
											<div class="app-field clearfix not-sortable js-not-sortable">
												<div class="appmsg appmsg-multiple-first">
													<h4 class="appmsg-title">1</h4>
													<p class="appmsg-meta">2015-12-23</p>
													<div class="appmsg-thumb-wrap">

														<p>封面图片</p>

													</div>

													<div class="appmsg-view-full clearfix">
														<span>阅读全文</span>
														<span class="pull-right">&gt;</span>
													</div>
												</div>

												<div class="actions">
													<div class="actions-wrap">
														<span class="action edit">编辑</span>

													</div>
												</div>
											</div>
											<div class="app-field clearfix not-sortable js-not-sortable">
												<div class="appmsg appmsg-multiple-others">
													<h4 class="appmsg-title">2</h4>
													<div class="appmsg-thumb-wrap">

														<p>缩略图</p>

													</div>
												</div>

												<div class="actions">
													<div class="actions-wrap">
														<span class="action edit">编辑</span>

													</div>
												</div>
											</div>

											<div class="app-field sortitem clearfix">
												<div class="appmsg appmsg-multiple-others">
													<h4 class="appmsg-title">标题</h4>
													<div class="appmsg-thumb-wrap">
														<p>缩略图</p>
													</div>
												</div>
												<div class="actions">
													<div class="actions-wrap"><span class="action edit">编辑</span> <span class="action delete">删除</span></div>
												</div>
											</div>
											<div class="app-field sortitem clearfix">
												<div class="appmsg appmsg-multiple-others">
													<h4 class="appmsg-title">标题</h4>
													<div class="appmsg-thumb-wrap">
														<p>缩略图</p>
													</div>
												</div>
												<div class="actions">
													<div class="actions-wrap"><span class="action edit">编辑</span> <span class="action delete">删除</span></div>
												</div>
											</div>
										</div>

									</div>

								</div>

								<div class="twshade"  style="position: absolute;  background-color: rgba(0,0,0,0.6); width: 325px; height: 388px;top: 0;display: none;"></div>	
							</div>

						</span>

					</div>
<div class="am-g am-text-center ">
							<ul class="pagination">
								<li><a href="http://he2/store-wechat?page=1" rel="prev">«</a></li>
								<li><a href="http://he2/store-wechat?page=1">1</a></li>
								<li class="active"><span>2</span></li>
								<li class="disabled"><span>»</span></li>
							</ul>
						</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="js-btn-ok btn btn-primary" data-loading-text="保存中..." id="tw">保存</button>
					<button type="button" class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
				</div>

			</div>

		</div>
		<!--[if (gte IE 9)|!(IE)]><!-->
		<script src="assets/js/jquery.min.js"></script>
		<!--<![endif]-->
		

		<script language="JavaScript">
			$(".app-design").click(function(){
//				方案1
//					var picshow=$(this).find(".imgshade").css("display")
//					if(picshow=="none"){
//						$("section .imgshade").hide()
//						$(this).find(".imgshade").show();
//						
//					}else{
//						$(this).find(".imgshade").hide();
//					}				
					var picshow=$(this).find(".twshade").css("display")
					if(picshow=="none"){
						$(".app-design .twshade").hide()
						$(".app-design").removeAttr("type")
						$(this).find(".twshade").show();
						$(this).attr("type","choose")
						$("#tw").removeAttr("disabled")
						
					}else{
						$(this).find(".twshade").hide();
						$("#tw").attr("disabled","")
						$(".app-design").removeAttr("type")
					}						
			})
			//'span[url='+deleteurl+']'
			var delbutton="<a class=\"am-btn am-btn-danger am-btn-xs am-radius deltw\">删除</a>";
			//还原
			var picadd="<div class=\"am-u-sm-8 am-u-md-4 am-u-sm-centered am-u-md-centered\"><button type=\"button\" class=\"am-btn am-btn-primary am-btn-block\" onclick=\"EditModal(event,&quot;layer-pic.html&quot;,&quot;新增图片&quot;,&quot;60%&quot;)\">媒体素材库<\/button><\/div>";
			var twadd="<div class=\"am-u-sm-8 am-u-md-4 am-u-sm-centered am-u-md-centered\"><button type=\"button\" class=\"am-btn am-btn-primary am-btn-block\" onclick=\"EditModal(event,&quot;layer-tw.html&quot;,&quot;新增图文&quot;,&quot;60%&quot;)\">媒体素材库<\/button><\/div>";
			var editarea2 ="<textarea class=\"\" style=\"width: 100%;\" rows=\"2\" placeholder=\"\" id=\"urlbox\"></textarea>"			
			var editarea1 = "<div class=\"js-editor-region\"><div class=\"simple-editor\"><div class=\"tab-content\"><div class=\"tab-pane active\" id=\"editor-text\"><div class=\"inputer vbox\"><div class=\"inputer-area vbox\"><textarea maxlength=\"600\" class=\"js-inputer-txta transparent-txta\" cols=\"30\" rows=\"1\" placeholder=\"\" id=\"textbox\"><\/textarea><\/div><div class=\"inputer-actions\"><ul class=\"simple-editor-nav\"><li><div data-popover-name=\"emoticon\" class=\"js-editor-popover inputer-action inputer-action-emoticon\"><a href=\"javascript:;\"><i class=\"ico-simple-editor ico-editor-emoticon\"><\/i> <span>表情<\/span><\/a><div class=\"popover bottom fade in\"><div class=\"arrow\"><\/div><div class=\"js-region-emoticon popover-content\"><\/div><\/div><\/div><\/li><li><div data-popover-name=\"hyperlink\" class=\"js-editor-popover inputer-action inputer-action-hyperlink\"><a href=\"javascript:;\"><i class=\"ico-simple-editor ico-editor-hyperlink\"><\/i> <span><\/span><\/a><div class=\"popover bottom fade in\"><div class=\"arrow\"><\/div><div class=\"js-region-hyperlink popover-content\"><div class=\"hyperlink\"><input class=\"js-txt input-large txt\" type=\"text\" placeholder=\"http://\"> <button type=\"submit\" class=\"js-btn-ok btn btn-primary\">确定<\/button><\/div><\/div><\/div><\/div><\/li><\/ul><div class=\"word-counter\"><span>大约还可输入<i class=\"js-word-counter\">600<\/i>字<\/span><\/div><\/div><\/div><\/div><\/div><\/div><\/div>";			
			$("#tw").click(function(){
				
				$(window.parent.document).find("#editcor").find(".twcor").html($('.app-design[type=choose]').clone())
				$(window.parent.document).find(".twshade").remove()
				$(window.parent.document).find("#editcor").find(".twcor").append(delbutton)
					$(window.parent.document).find("#editcor").find("#tab1").find(".modal-body").html(editarea1)
					$(window.parent.document).find("#editcor").find("#tab2").find(".modal-body").html(editarea2)
					$(window.parent.document).find("#editcor").find("#tab3").find(".piccor").html(picadd)				
				window.parent.layer.closeAll()
			})
		</script>
	</body>

</html>